package com.config;

import com.util.JwtUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class ApplicationStart implements ApplicationRunner {

    @Value("${jwt.sercetKey}")
    private String sercetKey ;

    @Value("${jwt.keeptime}")
    private String keeptime ;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        JwtUtil.sercetKey = sercetKey ;
        JwtUtil.keeptime = Long.parseLong(keeptime) ;
    }
}
